package com.stylefeng.guns.common.constant.state;

public enum IsExecute {
    NOT_EXECUTE(0,"未执行"),
    EXECUTE(1,"已执行");

    int code;
    String message;

    IsExecute(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static String valueOf(Integer status){
        if(status == null){
            return "";
        }else{
            for (IsExecute s: IsExecute.values()) {
                if(s.getCode() == status){
                    return s.getMessage();
                }
            }
        }
        return "";
    }
}
